package com.opdar.athena.web.base;

/**
 * Created by shiju on 2017/6/20.
 */
public class Result<T> {
    private int code = 0;
    private String msg = "操作成功";
    private T result;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public void failure(){
        this.msg = "操作失败";
        this.code = 1;
    }
}
